<?php
class SeoMetaController extends SeoMetaAppController {
	public $uses = array ('SeoMeta.SeoMeta');
	
	public function admin_innerConfig($id = false){
		if($this->request->is('post')||$this->request->is('put')){
			$state = $this->SeoMeta->save($this->request->data);
			if($state){
				
				$this->set('data',$this->SeoMeta->id);
				$this->set('state',true);
				$this->request->data['SeoMeta']['id'] = $this->SeoMeta->id; 
			}else{
				$this->set('state',false);
			}
		}else{
			if($id){
				$this->SeoMeta->id = $id;
				$this->request->data = $this->SeoMeta->read();
			}
			$this->set('state',true);
		}
	
	}
}
?>